package com.inspire.ijc.boot;

import java.util.concurrent.atomic.AtomicBoolean;

/**
 * @author ：inspire
 * @date ：Created in 2023/4/13 10:12
 * @description：
 * @modified By：inspire
 * @version:
 */
public class LoadState {
    private static final boolean STATE_NONE = false;
    private static final boolean STATE_STARTED = true;

    private final AtomicBoolean state = new AtomicBoolean(STATE_NONE);

    public boolean start() {
        return state.compareAndSet(STATE_NONE, STATE_STARTED);
    }
}
